package com.sc.nft.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sc.nft.entity.MallRankingListPool;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

/**
 * <p>
 * 商城排行榜总奖池 Mapper 接口
 * </p>
 *
 * @author ligen
 * @since 2024-01-28
 */
@Mapper
public interface MallRankingListPoolMapper extends BaseMapper<MallRankingListPool> {

    /**
     * 减去余额 加入冻结余额中
     *
     * @param id
     * @param initPoolReserve
     * @return
     */
    Boolean subAmount(@Param("id") Long id, @Param("initPoolReserve") BigDecimal initPoolReserve);

    /**
     * 减去冻结余额
     *
     * @param id
     * @param initPoolReserve
     * @return
     */
    Boolean subFreezeAmount(@Param("id") Long id, @Param("initPoolReserve") BigDecimal initPoolReserve);

    /**
     * 加入到余额中
     *
     * @param id
     * @param initPoolReserve
     * @return
     */
    Boolean addAmount(@Param("id") Long id, @Param("initPoolReserve") BigDecimal initPoolReserve);
}
